#include "screencap/readthread.h"
#include <QCoreApplication>
#include <iostream>
#include <QThread>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    ReadThread *readThread = new ReadThread();
    // readThread->setPath("rtmp://10.23.8.179:1935/live/stream");
    readThread->setPath("rtmp://127.0.0.1:1935/live/stream");
    // readThread->setPath("/home/luojiahao/TEST/screencap/build/1.mp4");
    readThread->open("");

    // 延迟10s
    QThread::sleep(1000);

    readThread->close();

    return a.exec();
}